package com.hoodbrains.insideloc.shopping;

public class ShoppingItem {
	String rayon;
	String product;
	boolean grabbed = false;
		
	
	public String getRayon() {
		return rayon;
	}

	public void setRayon(String rayon) {
		this.rayon = rayon;
	}

	public String getProduct() {
		return product;
	}

	public void setProduct(String product) {
		this.product = product;
	}

	public boolean isGrabbed() {
		return grabbed;
	}

	public void setGrabbed(boolean grabbed) {
		this.grabbed = grabbed;
	}

	public ShoppingItem(String product, String rayon) {
		this.product = product;
		this.rayon = rayon;
	}
	
	public String getName() {
		return product;
	}
	
	public void toggleGrabbed() {
		grabbed = !grabbed;
	}
	
	@Override
	public boolean equals(Object o){
		ShoppingItem it = (ShoppingItem) o;
		if (this.rayon.equals(it.rayon) 
				&& this.product.equals(it.product)){
			return true;
		}
		return false;
	}
}
